import LoginPage from '@/views/LoginPage/LoginPage.vue'
export default [
  {
    path: '/',
    redirect: '/login',
    meta:{
      isPublic:true
    }
  },
  {
    path: '/login',
    name: 'login',
    component: LoginPage,
    meta:{
      isPublic:true
    }
  },
  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "home" */ '@/views/HomePage/HomePage.vue'),
    children: [
      {
        path: 'welcome',
        name:'welcome',
        component: () => import(/* webpackChunkName: "home" */'@/views/WelcomePage/WelcomePage.vue'),
        meta:{
          navNames:['数据统计']
        }
      },
      {
        path: 'users',
        name:'users',
        component: () => import(/* webpackChunkName: "home" */'@/views/UserPage/UserPage.vue'),
        meta:{
          navNames:['用户管理','用户列表']
        }
      },
      {
        path: 'roles',
        name:'roles',
        component: () => import(/* webpackChunkName: "home" */'@/views/RolesPage/RolesPage.vue'),
        meta:{
          navNames:['权限管理','角色列表']
        }
      },
      {
        path: 'rights',
        name:'rights',
        component: () => import(/* webpackChunkName: "home" */'@/views/RightsPage/RightsPage.vue'),
        meta:{
          navNames:['权限管理','权限管理']
        }
      },
      {
        path: 'goods',
        name:'goods',
        component: () => import(/* webpackChunkName: "home" */'@/views/GoodPage/GoodPage.vue'),
        meta:{
          navNames:['商品管理','商品列表']
        }
      },
      {
        path: 'goods/add',
        name:'goodsAdd',
        component: () => import(/* webpackChunkName: "home" */'@/views/AddGoodPage/AddGoodPage.vue'),
        meta:{
          navNames:['商品管理','商品添加']
        }
      },
      {
        path: 'categories',
        name: 'categories',
        component: () => import(/* webpackChunkName: "home" */'@/views/CategoriesPage/CategoriesPage.vue'),
        meta:{
          navNames:['商品管理','商品分类']
        }
      },
      {
        path: 'params',
        name: 'params',
        component: () => import(/* webpackChunkName: "home" */'@/views/ParamsPage/ParamsPage.vue'),
        meta:{
          navNames:['商品管理','分类参数']
        }
      },
      {
        path: 'orders',
        name: 'orders',
        component: () => import(/* webpackChunkName: "home" */'@/views/OrderPage/OrderPage.vue'),
        meta:{
          navNames:['订单管理','订单列表']
        }
      },
      {
        path: 'auth',
        name: 'auth',
        component: () => import(/* webpackChunkName: "home" */'@/views/NoAuthPage/NoAuthPage.vue'),
        meta:{
          navNames:['403'],
          isNoAuth:true
        }
      },
      {
        path: ':arg(.*)*',
        component: () => import(/* webpackChunkName: "home" */'@/views/NotFound/NotFound.vue'),
        meta:{
          navNames:['404'],
          isNoAuth:true
        }
      }
    ]
  },
  {
    path: '/:arg(.*)*',
    redirect: '/login'
  }
]